home *** CD-ROM | disk | FTP | other *** search
- surface
- RCBulb(
- float Ks = 1.0,
- Ka = 0.1,
- Kd = 0.3,
- Ksilh = 0.05,
- roughness = 0.1,
- silhrough = 0.55;
- color specularcolor = 1)
-
- {
- point Nf = faceforward(normalize(N), I);
- point V = -normalize(I);
-
- Oi = Os;
- Ci = Oi*Cs*(Ka*ambient() + Kd*diffuse(Nf)) +
- specularcolor*Ks*specular(Nf, V, roughness)
- + specularcolor*Ksilh*(pow(1.0 - (V.Nf),1/silhrough));
- }
-